﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace X23.Application.NotificationManagement
{
    public interface INotificationManagementService
    {
        /// <summary>
        /// 给全部用户发送消息
        /// </summary>
        /// <param name="method">方法</param>
        /// <param name="arg">消息内容</param>
        /// <returns></returns>
        Task SendAll(string method, object arg);

        /// <summary>
        /// 给用户发消息
        /// </summary>
        /// <param name="user">用户唯一标识（用户id）[new Claim(ClaimTypes.NameIdentifier, user.Id.ToString())]</param>
        /// <param name="method">方法</param>
        /// <param name="arg">消息内容</param>
        /// <returns></returns>
        Task SendUser(string user, string method, object arg);

        /// <summary>
        /// 给组发消息
        /// </summary>
        /// <param name="groupName">用户组</param>
        /// <param name="method">方法</param>
        /// <param name="arg">消息内容</param>
        /// <returns></returns>
        Task SendGroup(string groupName, string method, object arg);
    }
}
